/*
* Copyright 2010 Dovado FZ-LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#import <Foundation/Foundation.h>
#import "DovadosNetworkRequest.h"

@interface DialogUtils : NSObject {
	
}

/*
 * Creates and shows a progress alert with title, message and a spinning progress indicator. 
 *
 * @param 
 *		title The Title of the dialog
 * @param 
 *		message The message of the dialog
 * @return 
 *		A handle to the dialog. Note that the dialog should be dismissed using the 'dismissAlert' function in this class. 
 */
+ (UIAlertView*) createProgressionAlertWithTitle:(NSString *)title andMessage: (NSString*) message;

/*
 * Dismisses an alert and calls releases the reference.
 *
 * @param
 *		The dialog to dismiss. If null nothing will happen.
 */
+ (void) dismissAlert: (UIAlertView*) alert;


/*
 * Shows a dialog displaying a detailed message of what went wrong when trying to connect to the router.
 */
+ (void) showConnectionFailedDialog: (request_error_codes_t) errorCode;

/*
 * Shows a dialog displaying a detailed message of what went wrong when result was retrieved from the router.
 */
+ (void) showOnConnectionResultErrorDialog: (request_listener_error_t) errorCode;

/*
 * Shows a dialog requesting the user to provide better login details.
 */
+ (void) showLoginFailedDialog;

/*
 * Shows a dialog telling the user that the feature is not avaible for this router.
 */
+ (void) showNotSupportedDialog;

/*
 * Shows a dialog.
 */
+ (void) showDialog:(NSString *)title andMessage: (NSString*) message;
@end
